Ext.namespace("SMeeting.Main");

SMeeting.Main.tabIndex = {
	"totask" : 0,
	"tofeedback":1,	
	"search" : 2
};
SMeeting.Main.tabs = [];

SMeeting.initUI = function() {
	var opentab = Utils.getParameter('opentab');
	if (!opentab) opentab = "totask";	
	// init tabs
	SMeeting.Main.tabs.push(new SMeeting.ToTask());
	SMeeting.Main.tabs.push(new SMeeting.ToFeedback2());
	SMeeting.Main.tabs.push(new SMeeting.Search2());	
	SMeeting.instance = new Ext.TabPanel({
		region: 'center',
		activeTab: SMeeting.Main.tabIndex[opentab],
		items: SMeeting.Main.tabs
	});
	
	var mainview = new Ext.Viewport({
        layout:'border',
        items:[SMeeting.instance]
    });
};

Ext.onReady(function(){
	Ext.QuickTips.init();
    Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
	SMeeting.initUI();
});

